<template>
  <div>
    <a-card :bordered="false" :bodyStyle="{ height: '100%', padding: '16px', position: 'relative' }">
      <div class="page-box">
        <div class="left-box">
          <div class="view-area-title" :style="{ backgroundImage: 'url(' + titleBackground + ')' }">
            {{ websiteList.title || '-' }}
          </div>
          <div class="view-item-wrapper" v-if="websiteList.showData.length>0">
            <img src="~@/assets/img/website/1.png" alt="" class="under-item-image" />

            <div class="view-area-item-new" v-for="(item, index) in websiteList.showData" :key="index+100" v-if="item.type == 1">
              <!-- <img src="~@/assets/img/website/2.png" class="carousal-empty-image" /> -->
              <img
                src="https://xiaomai-image.oss-cn-hangzhou.aliyuncs.com/MbDTadRzGeFiQAWEjxKEGbeA8Kxa8RQMTfKFksZ8zN5aj7ZB1583288394643"
                class="carousal-empty-image"
                v-if="item.rotationChart.length == 0"
              />
              <template v-if="item.rotationChart.length > 0">
                <swiper ref="mySwiper" :options="swiperOption" style="height: 100%">
                  <swiper-slide v-for="(val, j) in item.rotationChart" :key="j">
                    <img :src="val.url" alt="" style="width: 100%; height: 100%" />
                  </swiper-slide>
                  <div class="swiper-pagination" slot="pagination"></div>
                </swiper>
              </template>
            </div>
            <div class="view-area-item-new1 mt16" v-for="(item, index) in websiteList.showData" :key="index">
              <div class="graphic-component" v-if="item.type == 2">
                <div v-for="(val, j) in item.navigationList" :key="j" class="graphic-item">
                  <img :src="val.url" alt="" style="width: 40px; height: 40px; margin-bottom: 8px" />
                  <div>{{ val.title }}</div>
                </div>
              </div>
              <div class="bg-color" v-if="item.type == 3">
                <div class="address-component">
                  <img :src="item.addressInfo.banner" class="address-image" />
                  <div>
                    <div class="address-component-right">
                      <span
                        style="
                            font-size: 17px;
                            color: #394655;
                            width: 200px;
                            overflow: hidden;
                            text-overflow: ellipsis;
                            margin-bottom: 2px;
                          "
                      >{{ item.addressInfo.name }}</span
                      >
                      <img
                        src="~@/assets/img/website/11.gif"
                        style="width: 21px"
                        v-if="item.addressInfo.contactPhone"
                      />
                    </div>
                    <div class="address-component-right">
                      <span class="address-text">{{ item.addressInfo.address }}{{ item.addressInfo.street }}</span>
                      <img src="~@/assets/img/website/12.png" style="width: 20px" v-if="item.addressInfo.address" />
                    </div>
                  </div>
                </div>
                <div class="more-school" v-if="item.addressInfo.subCampus&&item.addressInfo.subCampus.length > 0">
                  更多校区<a-icon type="right" />
                </div>
              </div>
              <div class="bg-color introduce" v-if="item.type == 4">
                <div class="view-component">
                  <div class="hengxian"></div>
                  <span class="title">{{ item.name }}</span>
                </div>
                <div class="image-text-content" v-if="item.introInfo.cover_image && item.introInfo.intro">
                  <img :src="item.introInfo.cover_image" alt="" />
                  <div class="image-text-desc">{{ item.introInfo.intro }}</div>
                </div>
                <div class="inst-part-content--empty" v-else>
                  <img src="~@/assets/img/website/23.png" alt="" />
                  <div>未设置品牌介绍</div>
                </div>
              </div>
              <div class="bg-color teacher-team-component" v-if="item.type == 5">
                <div class="hengxian"></div>
                <div class="top-box">
                  <div class="title">{{ item.name }}</div>
                  <div class="more" v-if="item.showNumber < item.hotCourse.length">
                    更多
                    <a-icon
                      type="right"
                      style="margin-left: 5px; color: #96a1ae !important; font-size: 13px !important"
                    />
                  </div>
                </div>
                <template v-if="item.hotCourse.length > 0">
                  <div
                    class="course-box"
                    v-for="(val, j) in item.hotCourse"
                    :key="j"
                    :class="{ 'border-none': j == 0 }"
                    v-if="j < item.showNumber"
                  >
                    <div class="hot-course-item">
                      <img :src="val.cover_image" alt="" />
                      <div>
                        <div class="hot-course-name">{{ val.name }}</div>
                        <div class="hot-course-desc">{{ val.intro }}</div>
                      </div>
                    </div>
                  </div>
                </template>
                <div class="inst-part-content--empty" v-else>
                  <img src="~@/assets/img/website/23.png" alt="" />
                  <div>未设置热门课程</div>
                </div>
              </div>
              <div class="teacher-team-component" v-if="item.type == 6">
                <div class="hengxian"></div>
                <div class="top-box">
                  <div class="title">{{ item.name }}</div>
                  <div class="more" v-if="item.showNumber < item.teacherTeam.length">
                    更多
                    <a-icon
                      type="right"
                      style="margin-left: 5px; color: #96a1ae !important; font-size: 13px !important"
                    />
                  </div>
                </div>
                <div class="teacher-team-content" v-if="item.teacherTeam.length > 0">
                  <div
                    class="teacher-team-item"
                    v-for="(val, j) in item.teacherTeam"
                    :key="j"
                    v-if="j < item.showNumber"
                  >
                    <img :src="val.cover_image" alt="" />
                    <div class="teacher-item-name">{{ val.name }}</div>
                    <div class="teacher-item-desc">{{ val.intro }}</div>
                  </div>
                </div>
                <div class="inst-part-content--empty" v-else>
                  <img src="~@/assets/img/website/23.png" alt="" />
                  <div>未设置师资团队</div>
                </div>
              </div>
              <div class="bg-color teacher-team-component" v-if="item.type == 7">
                <div class="hengxian"></div>
                <div class="top-box">
                  <div class="title">{{ item.name }}</div>
                  <div class="more" v-if="item.showNumber < item.statStudent.length">
                    更多
                    <a-icon
                      type="right"
                      style="margin-left: 5px; color: #96a1ae !important; font-size: 13px !important"
                    />
                  </div>
                </div>
                <template v-if="item.statStudent.length > 0">
                  <div
                    class="course-box"
                    v-for="(val, j) in item.statStudent"
                    :key="j"
                    :class="{ 'border-none': j == 0 }"
                    v-if="j < item.showNumber"
                  >
                    <div class="hot-course-item" style="position: relative">
                      <!-- <img
                          src="~@/assets/img/website/17.png"
                          style="width: 35px; height: 35px; position: absolute; top: -14px; left: -13px; background: none"
                        /> -->
                      <img
                        :src="val.cover_image"
                        style="width: 60px; height: 60px; background: #e6e6e6; border-radius: 50%; z-index: 22"
                      />
                      <div>
                        <div class="hot-course-name">{{ val.name }}</div>
                        <div class="hot-course-desc">{{ val.intro }}</div>
                      </div>
                    </div>
                  </div>
                </template>
                <div class="inst-part-content--empty" v-else>
                  <img src="~@/assets/img/website/23.png" alt="" />
                  <div>未设置明星学员</div>
                </div>
              </div>
              <div class="bg-color" v-if="item.type == 8">
                <div class="view-component" style="border: none">
                  <div class="hengxian"></div>
                  <span class="title">{{ item.name }}</span>
                </div>
                <div class="new-box" v-if="item.schoolEnvironment.cover_image && item.schoolEnvironment.intro">
                  <img
                    :src="item.schoolEnvironment.cover_image"
                    alt=""
                    style="width: 80px; height: 80px; background: #e6e6e6; border-radius: 5px; margin-right: 12px"
                  />
                  <div class="news-info-desc">{{ item.schoolEnvironment.intro }}</div>
                </div>
                <div class="inst-part-content--empty" v-else>
                  <img src="~@/assets/img/website/23.png" alt="" />
                  <div>未设置校区环境</div>
                </div>
              </div>
              <div class="bg-color teacher-team-component" v-if="item.type == 9">
                <div class="hengxian"></div>
                <div class="top-box">
                  <div class="title">{{ item.name }}</div>
                  <div class="more" v-if="item.showNumber < item.elegantActivities.length">
                    更多
                    <a-icon
                      type="right"
                      style="margin-left: 5px; color: #96a1ae !important; font-size: 13px !important"
                    />
                  </div>
                </div>
                <template v-if="item.elegantActivities.length > 0">
                  <div
                    class="school-box"
                    v-for="(val, j) in item.elegantActivities"
                    :key="j"
                    :class="{ 'border-none': j == 0 }"
                    v-if="j < item.showNumber"
                  >
                    <img
                      :src="val.cover_image"
                      style="width: 100%; height: 156px; border-radius: 5px; margin-bottom: 8px"
                    />
                    <div class="image-text-desc">{{ val.name }}</div>
                  </div>
                </template>
                <div class="inst-part-content--empty" v-else>
                  <img src="~@/assets/img/website/23.png" alt="" />
                  <div>未设置活动风采</div>
                </div>
              </div>
              <div class="bg-color teacher-team-component" v-if="item.type == 10">
                <div class="hengxian"></div>
                <div class="top-box">
                  <div class="title">{{ item.name }}</div>
                  <div class="more" v-if="item.showNumber < item.LearningMaterials.length">
                    更多
                    <a-icon
                      type="right"
                      style="margin-left: 5px; color: #96a1ae !important; font-size: 13px !important"
                    />
                  </div>
                </div>
                <template v-if="item.LearningMaterials.length > 0">
                  <div
                    class="school-box"
                    v-for="(val, j) in item.LearningMaterials"
                    :key="j"
                    :class="{ 'border-none': j == 0 }"
                    v-if="j < item.showNumber"
                  >
                    <img
                      :src="val.cover_image"
                      style="width: 100%; height: 156px; border-radius: 5px; margin-bottom: 8px"
                    />
                    <div class="image-text-desc">{{ val.name }}</div>
                  </div>
                </template>
                <div class="inst-part-content--empty" v-else>
                  <img src="~@/assets/img/website/23.png" alt="" />
                  <div>未设置学习资料</div>
                </div>
              </div>
              <div class="bg-color teacher-team-component" v-if="item.type == 11">
                <div class="hengxian"></div>
                <div class="top-box">
                  <div class="title">{{ item.name }}</div>
                  <div class="more" v-if="item.showNumber < item.newsInfo.length">
                    更多
                    <a-icon
                      type="right"
                      style="margin-left: 5px; color: #96a1ae !important; font-size: 13px !important"
                    />
                  </div>
                </div>
                <template v-if="item.newsInfo.length > 0">
                  <div
                    class="new-box"
                    v-for="(val, j) in item.newsInfo"
                    :key="j"
                    :class="{ 'b-d-t': j > 0 }"
                    v-if="j < item.showNumber"
                  >
                    <img
                      :src="val.cover_image"
                      alt=""
                      style="width: 80px; height: 80px; background: #e6e6e6; border-radius: 5px; margin-right: 12px"
                    />
                    <div class="news-info-desc">{{ val.name }}</div>
                  </div>
                </template>
                <div class="inst-part-content--empty" v-else>
                  <img src="~@/assets/img/website/23.png" alt="" />
                  <div>未设置新闻动态</div>
                </div>
              </div>
              <div class="bg-color" style="padding: 2px" v-if="item.type == 12">
                <div class="trial">
                  <div class="trial-content" v-if="item.giftToShopFlag || item.auditionFlag || item.fullReductionFlag">
                    <div class="trial-content-desc">
                      <div class="decs-content" v-if="item.giftToShopFlag">
                        <div class="text">礼</div>
                        <div class="desc">{{ item.giftToShopText ? item.giftToShopText : '未设置' }}</div>
                      </div>
                      <div class="decs-content" v-if="item.auditionFlag">
                        <div class="text">免</div>
                        <div class="desc">{{ item.auditionText ? item.auditionText : '未设置' }}</div>
                      </div>
                      <div class="decs-content" v-if="item.fullReductionFlag">
                        <div class="text">减</div>
                        <div class="desc">{{ item.fullReductionText ? item.fullReductionText : '未设置' }}</div>
                      </div>
                    </div>
                    <div class="trial-content-icon">
                      领取礼包
                      <span class="more">
                        <a-icon type="right" style="margin-left: 1px" />
                      </span>
                    </div>
                  </div>
                  <div class="form-button" v-else>预约试听</div>
                </div>
              </div>
              <div class="bg-color teacher-team-component" v-if="item.type == 13">
                <div class="hengxian"></div>
                <div class="top-box">
                  <div class="title">{{ item.name }}</div>
                  <div class="more" v-if="item.showNumber < item.activities.length">
                    更多
                    <a-icon
                      type="right"
                      style="margin-left: 5px; color: #96a1ae !important; font-size: 13px !important"
                    />
                  </div>
                </div>
                <template v-if="item.activities.length > 0">
                  <div
                    class="new-box"
                    v-for="(val, j) in item.activities"
                    :key="j"
                    :class="{ 'b-d-t': j > 0 }"
                    v-if="j < item.showNumber"
                  >
                    <img
                      :src="val.template.cover"
                      alt=""
                      style="width: 80px; height: 80px; background: #e6e6e6; border-radius: 5px; margin-right: 12px"
                    />
                    <div class="active-box-right">
                      <div class="news-info-desc" style="margin-bottom:5px;">{{ val.activity_title }}</div>
                      <div class="right-count">
                        <countdown :startTime="val.start_time" :endTime="val.end_time"/>
                        <!-- <span class="more">
                                <a-icon type="right" style="font-size: 12px;color:#fff;" />
                          </span> -->
                      </div>
                    </div>
                    <!-- <div class="news-info-desc">{{ val.activity_title }}</div> -->
                    <!-- <countdown :startTime="val.start_time" :endTime="val.end_time"/> -->
                  </div>
                </template>
                <div class="inst-part-content--empty" v-else>
                  <img src="~@/assets/img/website/23.png" alt="" />
                  <div>未设置优惠活动</div>
                </div>
              </div>

            </div>
          </div>
          <div v-else class="empty-preview">
            <img src="~@/assets/img/website/23.png" alt="" style="width: 88px;height: 88px;"/>
            <div style="font-size: 13px;color: #96a1ae;line-height: 18px;">目前没有展示的信息哦</div>
          </div>
        </div>
        <div class="right-box">
          <a-button type="primary" style="margin-right: 10px" @click="createWebsite"> 编辑微官网 </a-button>
          <a-button @click="openTG">微信推广</a-button>

          <div class="right-priview-title">左图是机构当前微官网的预览效果。</div>
          <div>您可以编辑微官网首页，使用以下机构介绍相关模块组件来自由组合，搭建小程序端的个性化微官网。</div>
          <div class="inst-info-wrapper">
            <div>
              <div>机构信息管理</div>
              <div class="inst-info-box">
                <div
                  class="inst-info-choose"
                  v-for="(item, index) in tabList"
                  :key="index"
                  :class="{ mt40: index > 4 }"
                  @click="handerTab(item)"
                >
                  <img :src="item.url" alt="" style="width: 48px; height: 48px; cursor: pointer" />
                  <div class="choose-item-name">{{ item.title }}</div>
                </div>
              </div>
            </div>
            <!-- <div>营销工具管理</div> -->
          </div>
        </div>
      </div>
      <a-modal title="微信推广" :visible="visible" @cancel="visible = false" :footer="null" :width="680">
        <div class="model-box">
          <!-- <div class="model-left"> -->
          <!-- <div class="name">小程序码分享</div> -->
          <div class="desc">微信扫码，查看/分享微官网</div>
          <div class="erm-box">
            <vue-qr :text="caiWxQrcode" :size="170" :margin="20" class="qrcode" ref="qrcode"></vue-qr>
          </div>
          <a class="erm-down" @click="downloadQC">下载微官网二维码</a>
          <div style="margin-top:15px"><a class="btn_2" :data-clipboard-text="caiWxQrcode" @click="copy1('.btn_2')">{{ caiWxQrcode }}</a></div>
          <!-- </div> -->
          <!-- <div class="model-right">
            <div class="name">关联公众号</div>
            <div class="desc">如何通过公众号/微信推文宣传微官网，</div>
          </div> -->
        </div>
      </a-modal>
    </a-card>
  </div>
</template>

<script>
import { getSettingWebsite } from '@/api/websiteCreate'
import { swiper, swiperSlide } from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
import vueQr from 'vue-qr'
import Clipboard from 'clipboard'
import countdown from '@/components/websiteCountdown'
export default {
  components: { swiper, swiperSlide, vueQr, countdown },
  data () {
    return {
      hostUrl: '',
      caiWxQrcode: '',
      swiperOption: {
        loop: false,
        loopAdditionalSlides: 3,
        slidesPerview: 1,
        autoplay: {
          delay: 2000,
          disableOnInteraction: false
        },
        speed: 1000,
        observer: true, // 修改swiper自己或子元素时，自动初始化swiper
        observeParents: true, // 修改swiper的父元素时，自动初始化swiper
        pagination: {
          el: '.swiper-pagination'
          // clickable: true //允许分页点击跳转
        }
      },
      visible: false,
      titleBackground: require('@/assets/img/website/phone-title.png'),
      tabList: [
        {
          title: '品牌介绍',
          url: require('@/assets/img/website/3.png'),
          selRadio: 1
        },
        {
          title: '热门课程',
          url: require('@/assets/img/website/4.png'),
          selRadio: 2
        },
        {
          title: '师资团队',
          url: require('@/assets/img/website/5.png'),
          selRadio: 3
        },
        {
          title: '明星学员',
          url: require('@/assets/img/website/6.png'),
          selRadio: 4
        },
        {
          title: '校区环境',
          url: require('@/assets/img/website/7.png'),
          selRadio: 5
        },
        {
          title: '活动风采',
          url: require('@/assets/img/website/8.png'),
          selRadio: 6
        },
        {
          title: '学习资料',
          url: require('@/assets/img/website/21.png'),
          selRadio: 7
        },
        {
          title: '新闻动态',
          url: require('@/assets/img/website/9.png'),
          selRadio: 8
        }
      ],
      websiteList: {
        showData: []
      }
    }
  },
  created () {
    const ishttps = document.location.protocol == 'https:'
    if (ishttps) {
      this.hostUrl = 'https://' + window.location.host
    } else {
      this.hostUrl = 'http://' + window.location.host
    }
    this.getSetWebsite()
  },
  methods: {
    openTG () {
      // smallWebsite/index/index?sid=1
      this.caiWxQrcode = this.hostUrl + `/h5/#/smallWebsite/index/index?sid=${this.$store.state.user.school}`
      console.log(this.caiWxQrcode)
      this.visible = true
    },
    // 复制二维码链接
    copy1 (className) {
      const clipboard = new Clipboard(className)
      clipboard.on('success', (e) => {
        this.$message.success('复制成功')
        clipboard.destroy()
      })
      clipboard.on('error', (e) => {
        // 不支持复制
        this.$message.error('该浏览器不支持自动复制')
        clipboard.destroy()
      })
    },
    // 下载二维码
    downloadQC () {
      const blobs = this.$refs.qrcode.$el.src
      var a = document.createElement('a')
      var filename = '微官网二维码.jpeg'
      a.href = blobs
      a.download = filename
      a.click()
      window.URL.revokeObjectURL(blobs)
    },
    handerTab (data) {
      this.$router.push({
        name: 'websiteOrganizationInfo',
        query: {
          selRadio: data.selRadio
        }
      })
    },
    createWebsite () {
      this.$router.push({
        name: 'websiteCreate'
      })
    },
    getSetWebsite () {
      getSettingWebsite({ school_id: this.$store.state.user.school, key: 'website' })
        .then((res) => {
          this.websiteList = res.value
        })
        .catch((err) => {
          this.$message.error(err.data.message || '获取失败')
        })
    }
  }
}
</script>

<style lang="less" scoped>
.mt16 {
  margin-top: 16px;
}
.page-box {
  display: flex;
}
.left-box {
  width: 375px;
  min-height: 667px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 10px 0px;
  padding: 0px;
  border-radius: 5px;
  overflow: hidden;
  background: rgb(244, 246, 250);
}
.view-area-title {
  text-align: left;
  width: 375px;
  height: 64px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: 50%;
  position: relative;
  color: #fff;
  padding-top: 28px;
  padding-left: 16px;
  font-size: 18px;
  box-sizing: border-box;
}
.empty-preview{
  height: 499px;
    background: #fafafa;
    display: flex;
    justify-content: center;
    align-items: center;
        flex-direction: column;
}
.swiper-container{
  border-radius: 8px;
}
.view-item-wrapper {
  position: relative;
  width: 375px;
  height: 580px;
  background: rgb(244, 246, 250);
  overflow-y: auto;
  .under-item-image {
    width: 100%;
    height: 99px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
  }
  img {
    vertical-align: middle;
    border-style: none;
  }
  .view-area-item-new {
    padding: 0 16px;
    width: 100%;
    height: 120px;
    position: relative;
    z-index: 2;
    .carousal-empty-image {
      width: 343px;
      height: 120px;
    }
  }
}
.view-area-item-new1 {
  width: 100%;
  // height: 188px;
  padding: 0 16px;
  box-sizing: border-box;
}
.graphic-component {
  padding: 16px 10px 0 10px;
  max-height: 188px;
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  border-radius: 8px;
}
.graphic-item {
  width: 25%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin-bottom: 20px;
}
.address-component {
  padding: 20px 16px 10px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  border-radius: 8px;
}
.address-image {
  width: 44px;
  height: 44px;
  background: #e7ebef;
  border-radius: 5px;
  margin-right: 18px;
}
.address-component-right {
  display: flex;
  justify-content: space-between;
  align-items: center;
  .address-text {
    display: inline-block;
    width: 225px;
    font-size: 13px;
    color: #999;
    line-height: 18px;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}
.bg-color {
  background: #fff;
  border-radius: 8px;
}
.view-component {
  display: flex;
  align-items: center;
  // border-bottom: 1px solid #eee;
  position: relative;
  .title {
    padding: 10px 16px;
    font-size: 17px;
  }
}
.image-text-content {
  min-height: 213px;
  padding: 12px 16px 16px;
  img {
    width: 100%;
    height: 156px;
    border-radius: 5px;
    margin-bottom: 8px;
  }
  .image-text-desc {
    font-size: 15px;
    font-weight: 400;
    color: #96a1ae;
    line-height: 21px;
    text-overflow: ellipsis;
    width: 311px;
    overflow: hidden;
  }
}
.course-box {
  // min-height: 213px;
  padding: 12px 16px;
  border-top: 1px solid #eee;
}
.hot-course-item {
  display: flex;
  img {
    width: 80px;
    height: 80px;
    background: #e6e6e6;
    border-radius: 5px;
    margin-right: 12px;
  }
}
.hot-course-name {
  font-size: 15px;
  font-weight: 400;
  color: #394655;
  line-height: 21px;
  max-width: 217px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hot-course-desc {
  width: 217px;
  height: 18px;
  font-size: 13px;
  font-weight: 400;
  color: #96a1ae;
  line-height: 18px;
  margin-top: 4px;
  margin-bottom: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.teacher-box {
  margin-top: 16px;
  padding: 0 16px;

  .title {
    height: 44px;
    line-height: 44px;
    font-size: 16px;
    box-sizing: border-box;
    padding-bottom: 10px;
  }
}
.item-teacher {
  display: flex;
  justify-content: space-between;
}
.teahcer-left {
  width: 165px;
  height: 254px;
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
  padding-bottom: 16px;
  img {
    width: 165px;
    height: 165px;
  }
}
// .teacher-item-name {
//   font-size: 15px;
//   padding: 0 12px;
//   font-weight: 400;
//   color: #394655;
//   line-height: 21px;
//   margin-top: 12px;
//   width: 165px;
//   overflow: hidden;
//   text-overflow: ellipsis;
//   white-space: nowrap;
// }
// .teacher-item-desc {
//   width: 141px;
//   margin-top: 6px;
//   font-size: 13px;
//   font-weight: 400;
//   color: #96a1ae;
//   line-height: 18px;
//   margin: 0 auto;
//   text-overflow: ellipsis;
//   overflow: hidden;
//   display: -webkit-box;
//   -webkit-line-clamp: 2;
//   line-clamp: 2;
//   -webkit-box-orient: vertical;
// }
.new-box {
  display: flex;
  justify-content: space-between;
  // border-top: 1px solid #eee;
  padding: 12px 16px;
  // width: 343px;
}
.news-info-desc {
  font-size: 15px;
  font-weight: 400;
  color: #394655;
  line-height: 21px;
  width: 217px;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  overflow: hidden;
  -webkit-box-orient: vertical/*! autoprefixer: on */;
  height: 44px;
}
.school-box {
  padding: 12px 12px;
  border-top: 1px solid #eee;
}
.image-text-desc {
  font-size: 15px;
  font-weight: 400;
  color: #96a1ae;
  line-height: 21px;
  text-overflow: ellipsis;
  width: 311px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  overflow: hidden;
  -webkit-box-orient: vertical;
}
.active-box {
  padding: 12px;
  border-top: 1px solid #eee;
}
.activity-view-name {
  font-size: 15px;
  font-weight: 400;
  color: #96a1ae;
  line-height: 21px;
  max-width: 311px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.foot-btn {
  line-height: 44px;
  font-size: 15px;
  text-align: center;
  font-weight: 400;
  color: #fff;
  margin: 12px auto;
  width: 311px;
  height: 44px;
  background: linear-gradient(90deg, #fe0140, #ff5728) !important;
  border-radius: 22px;
}
.priview-title {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  font-size: 12px;
  color: #96a1ae;
}
.right-box {
  margin-left: 24px;
}
.right-priview-title {
  font-size: 16px;
  margin-top: 18px;
  margin-bottom: 8px;
  color: #333;
  line-height: 22px;
}
.inst-info-wrapper {
  padding: 16px;
  margin-top: 12px;
  border: 1px solid #e8e8e8;
}
.inst-info-box {
  padding: 24px 115px 24px 56px;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  width: 100%;
}
.inst-info-choose {
  width: 20%;
  text-align: center;
}
.choose-item-name {
  margin-top: 12px;
  font-size: 14px;
  color: #333;
  line-height: 20px;
}
.mt40 {
  margin-top: 40px;
}
.model-box {
  display: flex;
   flex-direction: column;
  justify-content: center;
  align-items: center;
  max-height: 70vh;
  overflow-y: auto;
  padding: 0 10px;
}
.model-left {
  // width: 50%;
  // display: flex;
  // flex-direction: column;
  // justify-content: center;
  // align-items: center;
  .name {
    font-size: 16px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #333;
  }
  .desc {
    font-size: 14px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #999;
    margin-bottom: 24px !important;
  }
  .erm-box {
    margin-left: 25px;
  }
  .erm-down {
    text-align: center;
    display: inline-block;
    margin-top: 20px;
    margin-left: 50px;
    font-size: 16px;
  }
}
.model-right {
  width: 50%;
  .name {
    font-size: 16px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #333;
  }
  .desc {
    font-size: 14px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #999;
    margin-bottom: 24px !important;
  }
}
.hengxian {
  position: absolute;
  width: 70px;
  height: 3px;
  background: #19be6b;
  border-radius: 5px;
  top: 32px;
  left: 16px;
  opacity: 0.6;
}
.border-none {
  border: none;
}
.teacher-team-component {
  position: relative;
  background: #fff;
  border-radius: 8px;
  .top-box {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .title {
      font-size: 17px;
      font-weight: 500;
      font-family: PingFang SC;
      color: #333333;
    }
  }
  .teacher-team-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 0 15px;
    .teacher-team-item {
      width: 151px;
      height: 254px;
      border-radius: 5px;
      overflow: hidden;
      background: #fff;
      padding-bottom: 16px;
      img {
        width: 165px;
        height: 165px;
      }
      .teacher-item-name {
        font-size: 15px;
        font-weight: 400;
        color: #394655;
        // line-height: 21px;
        margin-top: 12px;
        width: 165px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .teacher-item-desc {
        width: 141px;
        margin-top: 6px;
        font-size: 13px;
        font-weight: 400;
        color: #96a1ae;
        line-height: 18px;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        overflow: hidden;
        -webkit-box-orient: vertical /*! autoprefixer: on */;
      }
    }
  }
}
.more {
  font-size: 13px;
  font-weight: 400;
  color: #96a1ae;
}
.b-d-t {
  border-top: 1px solid #eee;
}
.trial {
  width: 100%;
  max-height: 92px;
  background-color: #fff;
  padding: 0 15px;
  .form-button {
    line-height: 44px;
    font-size: 15px;
    text-align: center;
    font-weight: 400;
    color: #fff;
    margin: 12px auto;
    width: 311px;
    height: 44px;
    border-radius: 22px;
    background: #19be6b;
  }
  .trial-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    .trial-content-desc {
      .decs-content {
        display: flex;
        margin-bottom: 6px;
        .text {
          width: 16px;
          height: 16px;
          font-size: 11px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 400;
          color: #fff;
          line-height: 16px;
          margin-right: 4px;
          background: linear-gradient(90deg, #fe0140, #ff5728);
          border-radius: 2px;
          text-align: center;
        }
        .desc {
          max-width: 160px;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          height: 16px;
          font-size: 11px;
          font-family: PingFangSC-Regular, PingFang SC;
          font-weight: 400;
          color: #394655;
          line-height: 16px;
        }
      }
      .decs-content:last-child {
        margin-bottom: 0;
      }
    }
    .trial-content-icon {
      width: 89px;
      height: 26px;
      background: linear-gradient(90deg, #fe0140, #ff5728);
      border-radius: 14px;
      font-size: 13px;
      font-family: PingFangSC-Regular, PingFang SC;
      font-weight: 400;
      color: #fff;
      line-height: 26px;
      display: flex;
      justify-content: space-around;
      padding-left: 12px;
      .more {
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #fff;
        color: #ff083f;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 4px;
      }
    }
  }
}
.more-school {
  text-align: center;
  font-size: 13px;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #96a1ae;
  padding-bottom: 8px;
}
.inst-part-content--empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 160px;
  img {
    width: 88px;
    height: 88px;
  }
}
.active-box-right{
  // display: flex;
  .right-count{
    display: flex;
    justify-content: space-between;
    align-items: center;
    .more{
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: linear-gradient(90deg,#fe0140,#ff5728);
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
}
</style>
